<?php

namespace Modules\Common\Models\Validation;


/**
 *@property int $id
 *@property string $name
 *@property string $email
 *@property string $phone
 *@property string $company
 *@property int $type
 *@property string $password
 *@property string $remember_token
 *@property int $admin_id
 *@property int $status
 *@property string $avatar
 *@property int $eid
 *@property int $bind_id
 *@property string $api_token
 *@property string $deafult_domin
 *@property string $province
 *@property string $city
 *@property int $area
 *@property int $sid
 *@property string $red_bag_discharge
 *@property string $help_step
 *@property string $wx_open_id
 *@property string $last_login_ip
 *@property string $created_at
 *@property string $updated_at
 *@property string $last_login_time
 */
trait AdminUserValidation 
{


    public function createRules()
    {
         return [
            'rules' => [
                'name'=>'between:0,5',
                'phone'=>'between:0,11|phone|single_unique:admin_users,phone',
                'type'=>'integer|in:0,1,2',
                
            ],
            'messages' => [
            ],
            'customAttributes' => [
            ]
        ];
    }

    public function updateRules()
    {
         return [
            'rules' => [
                'name'=>'between:0,5',
                'phone'=>'between:0,11|phone|single_unique:admin_users,phone',
                'type'=>'integer|in:0,1,2',
                
            ],
            'messages' => [
            ],
            'customAttributes' => [
            ]
        ];
    }


}
